package com.zyf.system.db.mysql;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zyf.system.constant.Status;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;
import java.util.Date;

/**
 * @author 张云帆
 * 2025/3/21 15:38
 * 挂号表
 */
@Entity
@Table(name = "registration")
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class Registration extends BaseEntity{
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 患者id
     */
    @Column(name = "patient_id")
    private Integer patientId;

    /**
     * 医生id
     */
    @Column(name = "doctor_id")
    private Integer doctorId;

    /**
     * 排班id
     */
    @Column(name = "schedule_id")
    private Integer scheduleId;

    /**
     * 挂号状态
     */
    @Column(name = "status")
    private Enum<Status> status;

    /**
     * 挂号时间
     */
    @Column(name = "registration_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date registrationTime;
}
